home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Imaging / RealShapes / GXShpe.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  2.6 KB  |  93 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        GXShpe.h
  3.  
  4.     Contains:    GXShape class, private to ODShape.
  5.  
  6.     Written by:    Jens Alfke
  7.  
  8.     Copyright:    © 1993 - 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>     12/5/94    jpa        Code-review cleanup [1203923]
  13.          <2>      8/8/94    jpa        Added Outset method [1178690]
  14.          <1>     6/15/94    jpa        first checked in
  15.                             --------Moved to SOM project and rearranged-----
  16.          <7>      5/9/94    jpa        Enable polygon clipper and GX support
  17.                                     [1162090]
  18.          <6>     3/15/94    MB        Changes to support SCpp/ASLM builds,
  19.                                     #1150864.
  20.          <5>     2/17/94    JA        Declare XMPPolygon as struct, not class.
  21.          <4>     2/16/94    JA        Include new AltPoint.h.
  22.          <3>     2/10/94    JA        Stop using ptrs to member fns.
  23.          <2>      2/9/94    JA        Renamed from ShapePrv.h --> ShapePvM.h
  24.          <6>      2/7/94    JA        Further tigerings.
  25.          <5>      2/3/94    JA        Tiger Team Makeover!
  26.          <4>     1/31/94    JA        XMPRealShape no longer derives from
  27.                                     XMPAbsShape. Other API improvements.
  28.          <3>    11/24/93    VL        Rolled back changes as ASLM build breaks
  29.                                     the THINK build.
  30.          <2>    11/23/93    VL        Made this work with ASLM.
  31.          <1>    11/23/93    JA        first checked in
  32. */
  33.  
  34.  
  35. #ifndef _GXSHPE_
  36. #define _GXSHPE_
  37.  
  38. #ifndef _ODTYPES_
  39. #include "ODTypes.h"
  40. #endif
  41.  
  42. #ifndef _PLFMDEF_
  43. #include "PlfmDef.h"
  44. #endif
  45.  
  46. #ifndef _REALSHPE_
  47. #include "RealShpe.h"        /* Base class*/
  48. #endif
  49.  
  50.  
  51. //==============================================================================
  52. // GXShape
  53. //==============================================================================
  54.  
  55.  
  56. class QDGXShape :public RealShape {
  57.     public:
  58.     QDGXShape( ODGeometryMode );
  59.     virtual ~QDGXShape( );
  60.     
  61.     ODVMethod ODSize        Purge( ODSize );
  62.  
  63.     ODVMethod void            GetBoundingBox( ODRect *bounds );
  64.     ODVMethod RealShape*    SetRectangle( const ODRect *rect );
  65.     ODVMethod void            CopyPolygon( ODPolygon& );
  66.     ODVMethod RealShape*    SetPolygon( const ODPolygon& );
  67.     ODVMethod void            SetPlatformShape( ODGraphicsSystem, ODPlatformShape );
  68.  
  69.     ODVMethod ODBoolean        IsSameAs( RealShape* compareShape );
  70.     ODVMethod ODBoolean        IsEmpty( );
  71.     ODVMethod ODBoolean        ContainsPoint(ODPoint point);
  72.     ODVMethod ODBoolean        IsRectangular( );
  73.     
  74.     ODVMethod RealShape*    Copy( );            // Really returns a ODGXShape*
  75.  
  76.     ODVMethod RealShape*    Transform( Environment*, ODTransform* );
  77.     ODVMethod RealShape*    Outset(ODCoordinate distance);
  78.     ODVMethod RealShape*    Subtract( RealShape* diffShape );
  79.     ODVMethod RealShape*    Intersect( RealShape* sectShape );
  80.     ODVMethod RealShape*    Union( RealShape* sectShape );
  81.     
  82.     protected:
  83.     ODVMethod void            InitQDRegion( );
  84.     ODVMethod gxShape        CopyGXShape( );
  85.  
  86.     private:
  87.     gxShape    fGXShape;
  88.     ODRect fBounds;
  89.     ODBoolean fBoundsValid;
  90. };
  91.  
  92.  
  93. #endif /*_GXSHPE_*/